import Vue from 'vue'
import Router from 'vue-router'

import Layout from '@/view/layout/layout'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/redirect',
      component: Layout,
      children: [
        {
          path: 'home',
          name: 'home',
          component: () => import('@/view/home'),
        },
        {
          path: 'pushPage',
          name: 'pushPage',
          component: () => import('@/view/pushPage'),
        },
        {
          path: 'accountBind',
          name: 'accountBind',
          component: () => import('@/view/accountBind'),
        }
      ]
    },
    {
      path: '/',
      name: 'login',
      component: () => import('@/view/login'),
    }
  ]
})
